<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.saftalk.ui.UIUserResult" %>

<!doctype html>
<html lang="en" ng-app="SaftalkMobile">
<head>

    <meta name="viewport" content="width=device-width,height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="description" content="Saftalk Application">
    <meta name="author" content="Saftalk">

    <title>Saftalk</title>

	<link rel="stylesheet" href="content/css/rtl.css">
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
    <link rel="stylesheet" href="mobile/css/mobile.css">

    <script src="mobile/js/jquery-mobile-angular-adapter-standalone-1.2.0.js"></script>
    <script src="content/js/fittext/jquery.fittext.js"></script>
    <script src="mobile/js/mobile.js?t=<%= new java.util.Date() %>"></script>
    <script src="mobile/js/login.js?t=<%= new java.util.Date() %>"></script>
    <script src="mobile/js/chat.js?t=<%= new java.util.Date() %>"></script>

    <script>

    globalAppParams = Object();
    		<%
		UIUserResult user = (UIUserResult) request.getSession().getAttribute("user");
		if (user != null) {
	%>
        globalAppParams.name = '<%= user.getName() %>';
		globalAppParams.channel= '<%= user.getChannel() %>';
		globalAppParams.userId='<%= user.getUserId() %>';
		globalAppParams.photoId='<%= user.getPhotoId() %>';
        globalAppParams.chatMode='<%= user.isSenior() ? 2 : 1 %>';
	<%
		}
		else{
			%>
            globalAppParams.userId='<%= 0%>';
        <%
		}
	%>
    </script>
</head>
    <div pub-key="pub-8e474368-7add-4283-9b87-caf9efbcdedc" sub-key="sub-1ffec1f3-9463-11e1-9376-77819258e702" ssl="off" origin="pubsub.pubnub.com" id="pubnub"></div>
    <script src="content/js/pubnub-3.4.min.js"></script>
    <div ng-include src="'mobile/html/main.html'"></div>

</html>
